4G, mobile website has been out of hand, PC end and mobile end of the website coexist. How to get someone to visit your PC-side website directly to the mobile end of the site? You reader, small two on the code! Here it comes!
The first way: the need for mobile phone-side also web page data synchronization
Copy Code code as follows:
The
Cool Disk PC version is an innovative concept of the synchronization network disk, different from the other traditional network disk is the concept of "synchronization."
In other words, the user installed the cool disk client software, as long as the file or folder copy or paste into the cool disk synchronization directory, the software will be in the background batch of files synchronously transferred to the server. The cool disk
In view of the site's compatibility under a variety of devices, there are very many sites will have mobile version and the computer version of the two version number. Visit the same site URL when the server identifies the user using the computer. Open the computer version of the page, the user assumes the use of mobile phone access, you will get the mobile version of the page.1. Infer the device type of the clientTo make a
4G ERA, mobile site has been very common, the general mobile site has a two-level domain name to access, such as m.16css.com if the phone directly access to www.16css.com is a PC site, on the phone to browse the computer version of the site experience is very bad.If you can
First of all, recommend a PHP lightweight identification class, mobile-detect specifically to identify whether the phone or PC-side access to the site, which can be based on the terminal type of access to the mobile browser to adapt to the Web site or PC Browser Web site.
M
1.phpcms-v9 By default, you can only get the current column and sub-columns under the CATID, but sometimes we need to use the {PC} tag to get the content of the entire site, what should be done?The first step: Add the following method to the content_tag.class.php file:1 /**2 * List page Label: The main return is the data in the main table and the data in the schedule3 * @param $data4 */5 Public fu
TP Framework Development site has a PC version and mobile phone version of how to automatically identify the visitor device and then into different versions
My image seems to have a very short section of the Baidu code can be achieved but now find no longer find the most simple way to ask the big God
Reply content:
TP Framework Development site has a
;} (4) if (httpcontext. current. request. headers ["User-Agent"]! = NULL httpcontext. Current. Request. headers ["User-Agent"]. tolower (). tostring (). indexof ("Mozilla ")! =-1) {httpcontext. current. response. redirect ("http: // www. "); // PC} else {httpcontext. current. response. redirect ("http: // WAP"); // mobile clienttypetesting .}
Of course, we can also determine whether it is a mobile device or a PC
; } } //protocol law, because there may be inaccuracies, put to the final Judgment if(isset($_server[' Http_accept '])) { //If only WML is supported and HTML is not supported that must be mobile device//If WML and HTML are supported but WML is mobile device before HTML if((Strpos($_server[' Http_accept '], ' vnd.wap.wml ')!==false) (Strpos($_server[' Http_accept '], ' text/html ') = = =false|| (Strpos($_server[' Http_accept '], ' vnd.wap.wml ') Strpos($_server[' Http_acce
format conversion tool, the above mentioned text, pictures, video, audio, common format conversion can be easily addressed. It even supports the common functions of mobile phones such as QR code conversion. Now also a new Chinese interface, not to try?Five, curtain-automatically for you to organize the mind mapWant to use simple, straightforward mind mapping to express ideas and ideas, like many Daniel, or organize your work ideas for a week in January? This web app, called "Curtain", is worth
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.